Skip to main content

All Questions

4votes
2answers
141views

Ruby CLI TicTacToe

I have done Tictactoe game in Ruby. It is my first Object Oriented project in Ruby. I would like to separate all program into a few classes such as Player Board and Game. I want to use more OOP best ...
theplaceofburak's user avatar
1vote
2answers
255views

Refactoring Ruby recharge REST API wrapper by using class variables

I am trying to create an API wrapper for recharge (A Shopify subscription service), I am using the HTTParty gem ...
Artyrcheek's user avatar
2votes
2answers
201views

Modelling football teams and fixtures in Ruby (as compared to SQL)

I am trying to model information around football teams and fixtures. I am using the Premier League fantasy football API for my data. The fixtures API is here, and the team data (along with a lot of ...
WelshGandalf's user avatar
1vote
1answer
716views

Creating an associated object on create/update

My app is setup where there are musical artists and albums have message boards through a has_one polymorphic association. ...
Carl Edwards's user avatar
3votes
1answer
80views

Ensure multiple steps work/saving multiple models via a service

I just thought of something new re: saving multiple objects in Rails (though Rails is not necessary). Objectives: Create an author and a tomato, but both of those must be valid. If invalid creation, ...
Daryll Santos's user avatar
1vote
1answer
57views

Old and new shouts controllers

I have a photo_shouts_controller.rb and text_shouts_controller.rb which both have almost similar implementations, and I would like to refactor it. I have implemented a refactoring but I am not too ...
Saad's user avatar
  • 111
3votes
1answer
48views

Classes for attributes validation

I have two classes responsible for attributes validation: ...
just so's user avatar
2votes
1answer
84views

Content management system for media

I have a content management system for an iOS app built with Rails. Right now there are three different types of content. The first two are just strings uploaded into a textfield by the user. One is ...
Ryan Collins's user avatar
4votes
1answer
7kviews

Searching over more models rails

I'm trying to implement search over two models. In this example Book and Article. Here are the attributes from both of these : <...
Gandalf StormCrow's user avatar
2votes
1answer
192views

Duplicating Rails model for a form with meta-programming

Can someone please review my code: ...
Arthur Corenzan's user avatar

close